﻿using MediatR;
using Traceability.Commont.Domains.ScratchTheFat;
using Traceability.Commont.DTOs.CommontFiles;
using Traceability.Commont.Infrastructures.Interfaces;

namespace U.Enterprise.Api.Applications.LoginNEwSheet
{
    public class InspectionDetailsCreateHandler : IRequestHandler<InspectionDetailsCreateCommond, Resqults>
    {

        private readonly IBateRepository<InspectionDetails> _InspectionDetails;

        public InspectionDetailsCreateHandler(IBateRepository<InspectionDetails> inspectionDetails)
        {
            _InspectionDetails = inspectionDetails;
        }

        public async Task<Resqults> Handle(InspectionDetailsCreateCommond request, CancellationToken cancellationToken)
        {
          
            var list=new Resqults() { Code=0};


            list.Date = _InspectionDetails.GetAll().ToList();

            return list;


        }
    }
}
